<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@page import="startup.model.trip.MissionRequest"%>
<%@page import="startup.model.user.Student"%>
<%
	try
	{
		Student student = ( Student )session.getAttribute( "currentSessionUser" );
		student.completeAttributesFromWorkingDB();
%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="windows-1252">
        <title>Deleted History</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Le styles -->
        <link href="styles/bootstrap.css" rel="stylesheet">
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
            .sidebar-nav {
                padding: 9px 0;
            }
        </style>
    </head>
    <body>
        <!--Barra Superiore-->
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="brand" href="#">Student : <%=student.getSurname()%> <%=student.getName()%> </a>
                    <div class="nav pull-right">
                        <ul class="nav">
                            <li>
                                <form action="Logout" method="post">
                                    <button class="btn btn-primary btn-small">Sign out</button>
                                </form>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!--CONTENUTO GRANDE -->
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span3" style="position:fixed;">
                    <div class="well sidebar-nav">
                        <ul class="nav nav-list">
                            <li><a href="javascript:history.back()"><i class="icon-arrow-left"></i> Back</a></li>
                            <li class="nav-header">Location</li>
                            <li><a href="studentChooseHistoryToShow.jsp"><i class="icon-home"></i> Home</a></li>
                            <li><a href="studentActualHistory.jsp"> &nbsp; &bull; <i class="icon-th-large"></i> ACTIVE History</a></li>
                            <li><a href="studentTerminatedHistory.jsp"> &nbsp; &bull; <i class="icon-th-large"></i> TERMINATED History</a></li>
                            <li class="active"><a href="#"> &nbsp; &bull; <i class="icon-white icon-th-large"></i> DELETED History</a></li>
                            <li class="nav-header">Function</li>
                            <li><a href="studentNewMissionRequestSubmission.jsp"><i class="icon-pencil"></i> New Mission Request</a></li>
                            <li><a href="studentShowNewAdvanceCompensation.jsp"><i class="icon-pencil"></i> New Advance Compensation</a></li>
                            <li><a href="studentShowNewReimbursement.jsp"><i class="icon-pencil"></i> New Reimbursement</a></li>
                            <li class="divider"></li>
                            <li><a href="studentFAQ.jsp"><i class="icon-info-sign"></i> F.A.Q.</a></li>             
                        </ul>
                    </div><!--/.well -->
                </div><!--/span-->
                <div class="span9" style="margin-left: 26%;">
                    <div class="row-fluid">
                        <div class="hero-unit">
                            <h1>Deleted Missions</h1>
                        </div>
                        <!--CONTENUTO LISTE -->
                        <div class="row-fluid">
                            <div>
                                <%
									Integer indice = 0;
									Integer elemento = 0;
									for( MissionRequest mission : student.getHistory().getDeletedMissionList().values() )
									{
										if( elemento % 4 == 0 )
										{
                                %>
                                <div class="row-fluid">
                                    <%      }

										elemento++;
                                    %>
                                    <div class="span3">
                                        <div class="thumbnail">
                                            <form action="estimate.jsp" method="post">
                                                <button class="thumbnail-bottone" style="height: 250px; width: 100%;">
                                                    <input name="IdPreventive" type="hidden" value="<%=mission.getId()%>" />
                                                    <strong><%=mission.getDestination()%> <br /> <%=mission.getPlannedStartDate()%></strong>
                                                    <br /><br />
                                                    <div class="well">
                                                        Status of trip :
                                                        <br />
                                                        <strong> <%=mission.getStatus().toString()%></strong>
                                                        <br />
                                                        Reason of trip:
                                                        <br />
                                                        <strong><%= mission.getPlannedReasonForTravel()%></strong>. 
                                                    </div>  
                                                </button>
                                            </form>
                                        </div>			    
                                    </div>
                                    <%
										if( elemento == 4 )
										{
											elemento = 0;
                                    %>
                                </div>
                                <br />
                                <br />
								<%
										}
										indice++;
									}
								%>
                            </div>
                            <br />
                        </div>
                        <br />
                        <br />
                    </div>
				</div>
            </div>
        </div><!--/.fluid-container-->
        <div class="navbarCC navbar-fixed-bottom">
            <div class="navbarCC-inner">
                <div class="container-fluid">				
                    <a class="brand" href="#">&copy; 2012 Startup</a>					
                </div>
            </div>
        </div>
		<!-- Il javascript -->
		<script src="js/jquery.js"></script>
		<script src="js/bootstrap.js"></script>
	</body>
</html>
<%
	}
	catch( RuntimeException runtimeException )
	{
		if( runtimeException.getClass().equals( NullPointerException.class ) )
		{
			runtimeException = new NullPointerException( "The session has timed out:<br />" + "" +
														 "try reloading page.<br />" +
														 "If the problem persists, please report it to the administration." );
		}
		request.setAttribute( "exception", runtimeException );
		request.getRequestDispatcher( "errorPage.jsp" ).forward( request, response );
	}
%>